package com.itheima.day20.demo07;

import java.util.function.Predicate;

public class PredicateDeemo01 {
    public static void main(String[] args) {
        String s = "wangjie";
        boolean boo = checkString(s, e -> e.contains("a"), e -> e.length() > 5, e -> e.contains("b"));
    }

    public static boolean checkString(String s, Predicate<String> one,
                                      Predicate<String> two, Predicate<String> three) {
        return one.and(two).and(three).test(s);
    }
}
